package www.wsdl.ctcc.sms.receive.v2_1._interface;

public class ReceiveSmsProxy implements www.wsdl.ctcc.sms.receive.v2_1._interface.ReceiveSms {
  private String _endpoint = null;
  private www.wsdl.ctcc.sms.receive.v2_1._interface.ReceiveSms receiveSms = null;
  
  public ReceiveSmsProxy() {
    _initReceiveSmsProxy();
  }
  
  public ReceiveSmsProxy(String endpoint) {
    _endpoint = endpoint;
    _initReceiveSmsProxy();
  }
  
  private void _initReceiveSmsProxy() {
    try {
      receiveSms = (new www.wsdl.ctcc.sms.receive.v2_1.service.ReceiveSmsServiceLocator()).getReceiveSms();
      if (receiveSms != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)receiveSms)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)receiveSms)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (receiveSms != null)
      ((javax.xml.rpc.Stub)receiveSms)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public www.wsdl.ctcc.sms.receive.v2_1._interface.ReceiveSms getReceiveSms() {
    if (receiveSms == null)
      _initReceiveSmsProxy();
    return receiveSms;
  }
  
  public www.schema.ctcc.sms.v2_1.SmsMessage[] getReceivedSms(String registrationIdentifier) throws java.rmi.RemoteException, www.schema.ctcc.common.v2_1.PolicyException, www.schema.ctcc.common.v2_1.ServiceException{
    if (receiveSms == null)
      _initReceiveSmsProxy();
    return receiveSms.getReceivedSms(registrationIdentifier);
  }
  
  
}